using System;
using System.ComponentModel;
using System.Xml.Serialization;

namespace com.exceptionalsoftware.spacetime.KML
{
	[Serializable()]
    [XmlType(TypeName = "ImagePyramidType")]
    public class ImagePyramid : ObjectType
	{
        private int tileSizeField;
        private int maxWidthField;
        private int maxHeightField;
        private gridOriginEnum gridOriginField;

        public ImagePyramid()
        {
            this.tileSizeField = 256;
            this.maxWidthField = 0;
            this.maxHeightField = 0;
            this.gridOriginField = gridOriginEnum.lowerLeft;
        }

        [XmlElement(ElementName = "tileSize", DataType = "int")]
        [DefaultValue(256)]
        public int TileSize
        {
            get { return this.tileSizeField; }
            set { this.tileSizeField = value; }
        }

        [XmlElement(ElementName = "maxWidth", DataType = "int")]
        [DefaultValue(0)]
        public int MaxWidth
        {
            get { return this.maxWidthField; }
            set { this.maxWidthField = value; }
        }

        [XmlElement(ElementName = "maxHeight", DataType = "int")]
        [DefaultValue(0)]
        public int maxHeight
        {
            get { return this.maxHeightField; }
            set { this.maxHeightField = value; }
        }

        [XmlElement(ElementName = "gridOrigin", Type = typeof(gridOriginEnum))]
        [DefaultValue(gridOriginEnum.lowerLeft)]
        public gridOriginEnum gridOrigin
        {
            get { return this.gridOriginField; }
            set { this.gridOriginField = value; }
        }
    }
    [XmlType(TypeName = "gridOriginEnum")]
    public enum gridOriginEnum
    {
        [XmlEnum(Name = "lowerLeft")]
        lowerLeft,

        [XmlEnum(Name = "upperLeft")]
        upperLeft
  }
}

